#ifndef MESHINFOPROCESS2D_HPP
#define MESHINFOPROCESS2D_HPP
/* ========================================================
 * MeshInfoProcess2D.hpp
 * This is the file that deals with the basic input 
 * geometry information.
 * Given the knot vector in s,t direction, polynomial
 * degree in s t direction, we need to generate the 
 * element connectivity, number of element, etc.
 * given the quadrature points in x,y direction, we need
 * to generate the quadrature points and weights in both 
 * direction. 
 * 
 * All of these information will be used through this 
 * program.
 *
 * Notice: This routine deals with 2d mesh only.
 *
 * Author: Ju Liu, Oct. 6th 2011                           
 * ======================================================*/
#include<vector>
using namespace std;

class MeshInfo_2d
{
  public:
    /* Connectivity */
    int ** INN;
    int ** IEN;
    /* element size */
    double * hx;
    double * hy;
    /* # of element */
    int nElem;
    int nElem_x;
    int nElem_y;
    /* degree of basis */
    int sDegree;
    int tDegree;
    /* # of basis function */
    int nFunc;
    int nFunc_x;
    int nFunc_y;
    int nLocBas;
    /* # of quadrature points */
    int nqp_x;
    int nqp_y;
    /* Quadrature points in both direction */
    double * qp_x;
    double * qp_y;
    double * wq_x;
    double * wq_y;

    /* Constructor */
    MeshInfo_2d( vector<double> sKnots, vector<double> tKnots,
                 int sDegree, int tDegree, int nqpx, int nqpy );

    /* Destructor */
    ~MeshInfo_2d( );

    /* Quadrature generator */
    void QuadratureRule(int nqp, double * &qp, double * &wq);
};

#endif
